fix(desktop): show Continue when a raw nsec is loaded in the backup restore dialog - #6649
fix(desktop): show Continue when a raw nsec is loaded in the backup restore dialog#6649BradGroux wants to merge 1 commit into
Conversation
…estore dialog
The backup-file restore dialog (mode="backup") accepts .key files
containing a raw nsec1 key. The file parser loads the key and shows
"Nostr identity found" with the derived npub, but the submit button
only rendered when mode === "key" or isPasswordStage (ncryptsec). A
raw nsec in backup mode satisfies neither condition, so the user sees
a recognized identity with no forward action — a dead end.
Add isValid to the render guard so a valid raw nsec shows the Continue
button regardless of mode. The button's disabled={!isValid} check
already prevents submission of invalid input.
Closes block#5261.
Co-authored-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: dm-builder <f01486f036641ccb52c11bb1e0ff2346ea89a8b4e3b49cd772249948f6fcbae6@digitalmeld.communities.buzz.xyz>
Signed-off-by: Brad Groux <bradgroux@hotmail.com>
Signed-off-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
12e1e78 to
1f9c2ff
Compare
|
Rebased onto the latest No review comments on this PR. CI will verify the build and test gate. |
1f9c2ff to
9f0c62d
Compare
🔐 Codex Security Review
|
|
Rebased onto the latest Still-needed assessment: No upstream commits in the 62-commit window address the same issue. This PR remains needed. Review requests: |
Summary
The backup-file restore dialog accepts
.keyfiles containing a rawnsec1private key. The file parser loads the key and displays "Nostr identity found" with the derived npub, but the submit button only rendered whenmode === "key"orisPasswordStage(ncryptsec). A raw nsec inmode="backup"satisfies neither condition, so the user sees a recognized identity with no Continue button — a dead end with no forward action.Add
isValidto the submit button's render guard so a valid raw nsec shows the Continue button regardless of mode. The button's existingdisabled={!isValid}check prevents submission of invalid input, andkeyImportSubmitEnabledalready validates the nsec by deriving its npub.Related issue
Fixes #5261.
Testing